"""
   author: 陈亚敏
   data: 2021/12/26  23:14
   project: 1
"""
import os
class Base():
    def addcreat(self,name):
        os.system(f'useradd {name}')
class A(Base):
    def see(self,name):
        os.system(f'id {name}')
    def cuid(self,name,uid):
        os.system(f'usermod -u {uid} {name}')
    def cshell(self,name,shell):
        os.system(f'usermod -s {shell} {name}')
    def cgid(self,name,gid):
        os.system(f'usermod -g {gid} {name}')
class B(Base):
    def userdel(self,name):
        os.system(f'userdel {name}')
    def groupdel(self,gname):
        os.system(f'groupdel {gname}')
class C(A,B,Exception):
    def groupadd(self,gname):
        self.gname=gname
        os.system(f'groupadd {gname}')
    def usermod(self,name):
        os.system(f'usermod -g {self.gname} {name}')
    def __init__(self,err):
        self.err=err
    def __str__(self):
        return self.err

